home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / src / binutils.252 / ld / scriptte / mips.sc < prev    next >
Encoding:
Text File  |  1994-09-20  |  1.2 KB  |  61 lines

  1. # Linker script for MIPS systems.
  2. # Ian Lance Taylor <ian@cygnus.com>.
  3. # These variables may be overridden by the emulation file.  The
  4. # defaults are appropriate for a DECstation running Ultrix.
  5. test -z "$ENTRY" && ENTRY=__start
  6. test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS"
  7. test -z "$DATA_ADDR" && DATA_ADDR=0x10000000
  8. cat <<EOF
  9. OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
  10.           "${LITTLE_OUTPUT_FORMAT}")
  11. ${LIB_SEARCH_DIRS}
  12.  
  13. ENTRY(${ENTRY})
  14.  
  15. SECTIONS
  16. {
  17.   ${RELOCATING+. = ${TEXT_START_ADDR};}
  18.   .text : {
  19.     ${RELOCATING+ _ftext = . };
  20.     *(.init)
  21.     ${RELOCATING+ eprol  =  .};
  22.     *(.text)
  23.     *(.fini)
  24.     ${RELOCATING+ etext  =  .};
  25.     ${RELOCATING+ _etext  =  .};
  26.   }
  27.   ${RELOCATING+. = ${DATA_ADDR};}
  28.   .rdata : {
  29.     *(.rdata)
  30.   }
  31.   ${RELOCATING+ _fdata = .;}
  32.   .data : {
  33.     *(.data)
  34.     ${CONSTRUCTING+CONSTRUCTORS}
  35.   }
  36.   ${RELOCATING+ _gp = ALIGN(16) + 0x8000;}
  37.   .lit8 : {
  38.     *(.lit8)
  39.   }
  40.   .lit4 : {
  41.     *(.lit4)
  42.   }
  43.   .sdata : {
  44.     *(.sdata)
  45.   }
  46.   ${RELOCATING+ edata  =  .;}
  47.   ${RELOCATING+ _edata  =  .;}
  48.   ${RELOCATING+ _fbss = .;}
  49.   .sbss : {
  50.     *(.sbss)
  51.     *(.scommon)
  52.   }
  53.   .bss : {
  54.     *(.bss)
  55.     *(COMMON)
  56.   }
  57.   ${RELOCATING+ end = .;}
  58.   ${RELOCATING+ _end = .;}
  59. }
  60. EOF
  61.